import Vue from 'vue'
import Router from 'vue-router'
// import navigationBar from '@/components/user/navigationBar'

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [

    //前台页面路由
    {
      path:'/',
      name:'home',
      component: ()=>import('@/components/user/home'),
      // redirect:'navigationBar',
      children:[
        // {path: '/user/navigationBar', name: 'navigationBar', component: navigationBar}
      ]
    },

    //教师
    {
      path:'/publicityPage',
      name:'publicityPage.vue',
      component:()=>import('@/components/user/publicityPage')
    },
    {
      path:"/teacherInfo",
      name:'teacherInfo',
      component:()=>import('@/components/user/teacherInfo')
    },
    {
      path:'/chapterInfo',
      name:'chapterInfo',
      component:()=>import('@/components/user/chapterInfo')
    },
    //后台页面路由
    {
      path:'/adminindex',
      name:'adminindex',
      component:()=>import('@/components/admin/adminindex'),
      children:[
        {path:'teacher',name:'teacher',component:()=>import('@/components/admin/teacher')},
        {path:'admin_student', name:'admin_student', component:()=>import('@/components/admin/admin_student')},
        {path:'admin_course', name:'admin_course', component:()=>import('@/components/admin/admin_course')},
      ]
    }
  ]
})
